<template>
	<div class="server">


		<van-row v-for="item in list" :key="item.id">
			<van-col span="4">
				【{{item.name}}】
			</van-col>
			<van-col span="5" v-for="child in item.child" :key="child.id" class="van-ellipsis" @click="getUrl(child.url)">
				{{child.name}}
			</van-col>

		</van-row>

	</div>

</template>

<script>
	import online from "@/assets/img/online.png"
	import zixun from "@/assets/img/zixun.png"
	export default {
		name: "Server",
		components: {

		},
		data() {
			return {
				active: 0,
				online: online,
				zixun: zixun,
				list: []
			}
		},
		mounted() {
			this.$api.home.navigation({
				type: 24
			}).then(res => {
				// 执行某些操作
				if (res.code == 1) {
					this.list = res.data
				}

			})
		},
		methods: {
			getUrl(url) {
				window.location.href = url
			}
		}


	}
</script>

<style scoped lang="less">
	.server {
		width: 95%;
		// height:8.56rem;
		background: rgba(255, 255, 255, 1);
		box-shadow: 0rem 0rem 0rem 0rem rgba(206, 206, 206, 0.29);
		border-radius: 0.2rem;
		margin: 0.5rem auto;
		padding: 0.88rem 0.78rem;
	}
</style>
<style lang="less">
	.server {
		.van-ellipsis {
			font-size: 0.81rem;
			font-family: PingFang SC;
			font-weight: 500;
		}

		.van-col--5 {
			font-size: 0.75rem;
			font-family: PingFang SC;
			font-weight: 500;
			color: rgba(89, 89, 89, 1);


		}

		.van-col--4 {
			font-size: 0.81rem;
			font-family: PingFang SC;
			font-weight: 500;
			color: #FF6B14;


		}

		.van-row {
			margin-bottom: 1.63rem;

			&:last-child {
				margin-bottom: 0;
			}
		}
	}
</style>
